# 定义一个函数, 做2个数的加法;  然后我们定义一个装饰器, 对原函数记录运行日志;
import time as t
def wrapper(fn):
    def inner(*args, **kwargs):
        start = t.time()
        print('start time:', start)
        ret = fn(*args, **kwargs)
        end = t.time()
        print('end time:', end)
        print('total:', end-start)
        return ret
    return inner

@wrapper
def add2nums(a, b):
    t.sleep(0.1)
    return a + b


add2nums(2352423,543265465489)
